home *** CD-ROM | disk | FTP | other *** search
/ Oh!X 2000 Spring / Oh!X 2000 Spring Special CD-ROM (Japan) (Part 2).7z / Oh!X 2000 Spring Special CD-ROM (Japan) (Part 2).bin / DXF / samples / multimedia / dplay / src / duel / duel.h < prev    next >
C/C++ Source or Header  |  1999-07-23  |  3KB  |  98 lines

  1. //-----------------------------------------------------------------------------
  2. // File: Duel.h
  3. //
  4. // Desc: Duel include file
  5. //
  6. // Copyright (C) 1995-1999 Microsoft Corporation. All Rights Reserved.
  7. //-----------------------------------------------------------------------------
  8. #ifndef DUEL_INCLUDED
  9. #define DUEL_INCLUDED
  10.  
  11. // bcc32 does not support nameless unions in C mode
  12. #if defined(__BORLANDC__) && !defined(__cplusplus)
  13. #define NONAMELESSUNION
  14. #endif
  15.  
  16. #ifndef WIN32_LEAN_AND_MEAN
  17. #define WIN32_LEAN_AND_MEAN
  18. #endif
  19. #include <windows.h>
  20. #include <windowsx.h>
  21. #include <mmsystem.h>
  22. #include "resource.h"
  23. #include <wtypes.h>
  24. #include <tchar.h>
  25.  
  26.  
  27.  
  28.  
  29. //-----------------------------------------------------------------------------
  30. // Application constants
  31. //-----------------------------------------------------------------------------
  32.  
  33. // Dialog exit codes
  34. #define EXITCODE_FORWARD      1  // Dialog success, so go forward
  35. #define EXITCODE_BACKUP       2  // Dialog canceled, show previous dialog
  36. #define EXITCODE_QUIT         3  // Dialog quit, close app
  37. #define EXITCODE_ERROR        4  // Dialog error, terminate app
  38. #define EXITCODE_LOBBYCONNECT 5  // Dialog connected from lobby, connect success
  39.  
  40. // User messages
  41. #define UM_LAUNCH       WM_USER
  42. #define UM_ABORT        WM_USER+1
  43. #define UM_RESTARTTIMER WM_USER+2
  44.  
  45. // program states
  46. enum{ PS_SPLASH, PS_ACTIVE, PS_REST };
  47.  
  48. #define MAX_SCREEN_X      639
  49. #define MAX_SCREEN_Y      479
  50. #define MAX_PLAYER_NAME    14
  51. #define MAX_SESSION_NAME  256
  52. #define MAX_SPNAME         50
  53. #define MAX_CLASSNAME      50
  54. #define MAX_WINDOWTITLE    50
  55. #define MAX_ERRORMSG      256
  56. #define MAX_FONTNAME       50
  57. #define MAX_HELPMSG       512
  58.  
  59. #define RECEIVE_TIMER_ID    1
  60. #define RECEIVE_TIMEOUT  1000    // in milliseconds
  61.  
  62. #define ENUM_TIMER_ID       2
  63. #define ENUM_TIMEOUT     2000    // in milliseconds
  64.  
  65. // Default window size
  66. #define MAX_DEFWIN_X      640
  67. #define MAX_DEFWIN_Y      480
  68.  
  69.  
  70. // Tree view image info
  71. #define CX_BITMAP        25
  72. #define CY_BITMAP        25
  73. #define NUM_BITMAPS      2
  74.  
  75. // registry info
  76. #define DUEL_KEY (TEXT("Software\\Microsoft\\Duel"))
  77.  
  78.  
  79.  
  80.  
  81. //-----------------------------------------------------------------------------
  82. // Prototypes
  83. //-----------------------------------------------------------------------------
  84. VOID ShowError( int err );
  85. VOID UpdateTitle();
  86.  
  87. // Functions defined in util.c
  88. int     randInt( int low, int high );
  89. double  randDouble( double low, double high );
  90. #define TRACE   dtrace 
  91. void dtrace( TCHAR* strFormat, ...);
  92.  
  93. #endif
  94.  
  95.  
  96.  
  97.  
  98.